Reading and writing source code is a primary task of a computer programmer. The vast quantity of source code in many projects presents huge challenges for the programmer. One of the most difficult aspects of editing source code is navigating around in the source code. A source code file, in a “textual rendering”, is regularly tall and narrow (e.g. 80 characters wide and thousands of lines from top to bottom). Containing hundreds or even thousands of lines of code, a source code file in a “textual rendering” rarely fits on the computer monitor in its entirety. Thus, a programmer has to use a scrollbar to navigate to different sections of the source code. Without seeing the entire set of source code, navigating to portions of the source code can be like “trying to find a way through the woods.”
Over the years source code editors have seen improvements in several ways. “Syntax highlighting” improves the recognition of code portions representing different language structures and syntax via textual font changes. For example, commented text, variable declarations, structure identifiers may all have different fonts. Similarly, the ubiquitous “colored squiggly” may be used to indicate misspelled words or inappropriately applied grammar. A disadvantage of these text enhancing techniques is that the extra information presented must be rendered together with the textual rendering of the source code file. This means that the programmer has to look through the text of the source code to find them. A further disadvantage of these techniques is that they do not solve or even address the problem of visually fitting a file containing lengthy computer code on the computer monitor in its entirety.
In some integrated environments, scrollbars of source code editors include colored lines or glyphs to indicate the relative positions of methods. This technique would help a developer navigate using the scrollbar to a method within a file. A disadvantage of this technique is that it does not reveal structures and patterns of the computer code in the file as a whole or even within a single method. A further disadvantage is that the colored lines or glyphs only provide navigational information to a textual rendering of the computer code, and do not provide information about logics or relationships in the source code file.
Because of these limitations, the existing techniques are not as visually helpful to a programmer as would be desired. As a result, an improved visual rendering of a file containing computer code, which would enable a programmer to better navigate to specific portions of source code within the file, is needed.